package com.px.controller;

import com.px.dao.UserDao;
import com.px.pojo.ShUser;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
public class ProviderSmsUserController {
    @Resource
    private UserDao userDao;


    @PostMapping("/dxa")
    public boolean dxtj(@RequestBody ShUser shUser)throws Exception{
        Integer insert = userDao.insert(shUser);
        if (insert > 0){
            return true;
        }
        return false;
    }

    @PostMapping("/dxb")
    public ShUser czyh(@RequestParam String account)throws Exception{
        return  userDao.queryAccount(account);
    }
}
